<template>
	<view>
		<top name="123456" @passValue='passV'></top>
		个人页11111111111
		<button type="default" @click="change">修改</button>
		<u-button>默认按钮</u-button>
		<u-button type="primary">主要按钮</u-button>
		<u-button type="success">成功按钮</u-button>
		<u-button type="info">信息按钮</u-button>
		<u-button type="warning">警告按钮</u-button>
		<u-button type="error">危险按钮</u-button>
		<button @click="setStroage">异步本地存储</button>
		<button @click="setStorageSync">同步本地存储</button>
	</view>
</template>

<script>
	import top from "../../components/top.vue"
	// import {get,post} from "../../utils/http"
	import {djPartyHistory} from "../../api/index.js"
	export default {
		data() {
			return {

			}
		},
		components: {
			top
		},
		methods: {
			passV(date) {
				console.log(date)
			},
			change() {
				this.$store.commit('modifyChange', 123456)
			},
			setStroage() {
				console.log('异步存, 同步取')
				uni.setStorage({
					key: "id1",
					data: 123456789,
					success: (res) => {
						console.log(res)
					}
				})
				console.log(uni.getStorageSync("id2")) 
			},
			setStorageSync() {
				console.log('同步存, 异步取')
				uni.setStorageSync('id2', 987654321)
				uni.getStorage({
					key: "id1",
					success: (res) => {
						console.log(res)
					}
				})

			}
		},
		onLoad() {
			console.log(this.$store.state.num)
			console.log(this.$store.state.id)
			console.log(this.$store.getters.newNum)
			djPartyHistory().then(res=>{
				console.log(res)
			})
			// post("/api/dangjian/djPartyHistory/list",{date:'04-12'}).then(res=>{
			// 	console.log(res)
			// })
		}
	}
</script>

<style>

</style>
